package com.cyzy.esbean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.cyzy.vo.QuestionOptions;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.io.Serializable;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
@JsonIgnoreProperties(ignoreUnknown = true)
@Document(indexName = "question_index",createIndex = false)
public class EsQuestions implements Serializable {

  @Field(type = FieldType.Integer)
  private long id;
  @Field(type = FieldType.Keyword)
  private long examLibraryId;
  @Field(type = FieldType.Keyword)
  private long questionTypeId;
  @Field(type = FieldType.Keyword)
  private String questionText;
  @Field(type = FieldType.Keyword)
  private String correctAnswer;
  @Field(type = FieldType.Keyword)
  private long status;
  @Field(type = FieldType.Keyword)
  private List<QuestionOptions> questionOptions;

}
